{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Instr =  0 ( 0 )\n",
      "[   0,   50,    0,    0]    [NOP , LWD , NOP , NOP ]    \n",
      "[   0,    0,    0, 37800]    [NOP , SADD, NOP , LWD ]    \n",
      "[   0,    0, 36464,    0]    [NOP , NOP , LWD , SADD]    \n",
      "[   0,  123,  112,   45]    [NOP , LWD , LWD , LWD ]    \n",
      "-------\n",
      "Instr =  1 ( 1 )\n",
      "[   0,   50,    0,    0]    [NOP , NOP , NOP , NOP ]    \n",
      "[   0,    0,    0, 37800]    [NOP , NOP , NOP , NOP ]    \n",
      "[   0,    0, 36464,    0]    [NOP , NOP , NOP , NOP ]    \n",
      "[   0,  123,  112,    0]    [NOP , NOP , NOP , SADD]    \n",
      "-------\n",
      "Instr =  2 ( 2 )\n",
      "[   0,   50,    0,    0]    [NOP , NOP , NOP , SMUL]    \n",
      "[   0,    0,    0, 37800]    [NOP , NOP , NOP , NOP ]    \n",
      "[   0,    0, 36464,    1]    [NOP , NOP , NOP , SADD]    \n",
      "[   0,  123,  112,    0]    [NOP , NOP , NOP , NOP ]    \n",
      "-------\n",
      "Instr =  3 ( 3 )\n",
      "[   0,   50,    0,    0]    [NOP , NOP , NOP , NOP ]    \n",
      "[   0,    0,    0, 37800]    [SADD, NOP , NOP , SADD]    \n",
      "[   0,    0, 36464,    1]    [NOP , NOP , NOP , NOP ]    \n",
      "[   0,  123,  112,    1]    [NOP , NOP , NOP , SADD]    \n",
      "-------\n",
      "Instr =  4 ( 4 )\n",
      "[   0,   50,    0,    4]    [NOP , NOP , NOP , SMUL]    \n",
      "[   0,    1,   -1, 37800]    [NOP , SADD, LWI , NOP ]    \n",
      "[   0,    0, 36464,    2]    [NOP , NOP , NOP , SADD]    \n",
      "[   0,  123,  112,   18]    [NOP , NOP , NOP , BEQ ]    \n",
      "-------\n",
      "Instr =  5 ( 5 )\n",
      "[  -1,   50,    0,    4]    [LXOR, NOP , NOP , NOP ]    \n",
      "[   1,    1,   -1, 37804]    [SADD, NOP , NOP , SADD]    \n",
      "[   0,    0,   -4,    2]    [NOP , NOP , SMUL, NOP ]    \n",
      "[   0,  123,  112,    2]    [NOP , NOP , NOP , SADD]    \n",
      "-------\n",
      "Instr =  6 ( 6 )\n",
      "[  -1,   50,    0,    8]    [NOP , NOP , NOP , SMUL]    \n",
      "[   1,    2,   -1, 37804]    [NOP , SADD, LWI , NOP ]    \n",
      "[   0,    0, 36460,    3]    [NOP , NOP , SADD, SADD]    \n",
      "[   0,  123,  112,   18]    [NOP , NOP , NOP , BEQ ]    \n",
      "-------\n",
      "Instr =  7 ( 7 )\n",
      "[  -2,   49,    0,    8]    [LXOR, SADD, NOP , NOP ]    \n",
      "[   2,    2,   -1, 37808]    [SADD, NOP , NOP , SADD]    \n",
      "[   0,    0,   -4,    3]    [NOP , NOP , SMUL, NOP ]    \n",
      "[   0,  123,   -1,    3]    [NOP , NOP , LWI , SADD]    \n",
      "-------\n",
      "Instr =  8 ( 8 )\n",
      "[  -2,   49,    0,   12]    [NOP , NOP , NOP , SMUL]    \n",
      "[   2,    3,   -1, 37808]    [NOP , SADD, LWI , NOP ]    \n",
      "[   0,    0, 36460,    4]    [NOP , NOP , SADD, SADD]    \n",
      "[   0,  123, -113,   11]    [NOP , SADD, SSUB, BEQ ]    \n",
      "-------\n",
      "Instr =  9 ( 9 )\n",
      "[  -3,   48,    0,   12]    [LXOR, SADD, NOP , NOP ]    \n",
      "[   3,    3,   -1, 37812]    [SADD, NOP , NOP , SADD]    \n",
      "[   0,    0,   -4,    4]    [NOP , NOP , SMUL, NOP ]    \n",
      "[   0,  123,   -1,    4]    [NOP , BZFA, LWI , SADD]    \n",
      "-------\n",
      "Instr =  10 ( 10 )\n",
      "[  -3,   48,    0,   16]    [NOP , NOP , NOP , SMUL]    \n",
      "[   3,    4,   -1, 37812]    [NOP , SADD, LWI , NOP ]    \n",
      "[   0,    0, 36460,    5]    [NOP , NOP , SADD, SADD]    \n",
      "[   0,  123, -113,    9]    [NOP , SADD, SSUB, BNE ]    \n",
      "-------\n",
      "Instr =  11 ( 9 )\n",
      "[  -4,   47,    0,   16]    [LXOR, SADD, NOP , NOP ]    \n",
      "[   4,    4,   -1, 37816]    [SADD, NOP , NOP , SADD]    \n",
      "[   0,    0,   -4,    5]    [NOP , NOP , SMUL, NOP ]    \n",
      "[   0,  123,   -1,    5]    [NOP , BZFA, LWI , SADD]    \n",
      "-------\n",
      "Instr =  12 ( 10 )\n",
      "[  -4,   47,    0,   20]    [NOP , NOP , NOP , SMUL]    \n",
      "[   4,    5,   -1, 37816]    [NOP , SADD, LWI , NOP ]    \n",
      "[   0,    0, 36460,    6]    [NOP , NOP , SADD, SADD]    \n",
      "[   0,  123, -113,    9]    [NOP , SADD, SSUB, BNE ]    \n",
      "-------\n",
      "Instr =  13 ( 9 )\n",
      "[  -5,   46,    0,   20]    [LXOR, SADD, NOP , NOP ]    \n",
      "[   5,    5,   -1, 37820]    [SADD, NOP , NOP , SADD]    \n",
      "[   0,    0,   -4,    6]    [NOP , NOP , SMUL, NOP ]    \n",
      "[   0,  123,   -1,    6]    [NOP , BZFA, LWI , SADD]    \n",
      "-------\n",
      "Instr =  14 ( 10 )\n",
      "[  -5,   46,    0,   24]    [NOP , NOP , NOP , SMUL]    \n",
      "[   5,    6,   -1, 37820]    [NOP , SADD, LWI , NOP ]    \n",
      "[   0,    0, 36460,    7]    [NOP , NOP , SADD, SADD]    \n",
      "[   0,  123, -113,    9]    [NOP , SADD, SSUB, BNE ]    \n",
      "-------\n",
      "Instr =  15 ( 9 )\n",
      "[  -6,   45,    0,   24]    [LXOR, SADD, NOP , NOP ]    \n",
      "[   6,    6,   -1, 37824]    [SADD, NOP , NOP , SADD]    \n",
      "[   0,    0,   -4,    7]    [NOP , NOP , SMUL, NOP ]    \n",
      "[   0,  123,   -1,    7]    [NOP , BZFA, LWI , SADD]    \n",
      "-------\n",
      "Instr =  16 ( 10 )\n",
      "[  -6,   45,    0,   28]    [NOP , NOP , NOP , SMUL]    \n",
      "[   6,    7,   -1, 37824]    [NOP , SADD, LWI , NOP ]    \n",
      "[   0,    0, 36460,    8]    [NOP , NOP , SADD, SADD]    \n",
      "[   0,  123, -113,    9]    [NOP , SADD, SSUB, BNE ]    \n",
      "-------\n",
      "Instr =  17 ( 9 )\n",
      "[  -7,   44,    0,   28]    [LXOR, SADD, NOP , NOP ]    \n",
      "[   7,    7,   -1, 37828]    [SADD, NOP , NOP , SADD]    \n",
      "[   0,    0,   -4,    8]    [NOP , NOP , SMUL, NOP ]    \n",
      "[   0,  123,   -1,    8]    [NOP , BZFA, LWI , SADD]    \n",
      "-------\n",
      "Instr =  18 ( 10 )\n",
      "[  -7,   44,    0,   32]    [NOP , NOP , NOP , SMUL]    \n",
      "[   7,    8,   -1, 37828]    [NOP , SADD, LWI , NOP ]    \n",
      "[   0,    0, 36460,    9]    [NOP , NOP , SADD, SADD]    \n",
      "[   0,  123, -113,    9]    [NOP , SADD, SSUB, BNE ]    \n",
      "-------\n",
      "Instr =  19 ( 9 )\n",
      "[  -8,   43,    0,   32]    [LXOR, SADD, NOP , NOP ]    \n",
      "[   8,    8,   -1, 37832]    [SADD, NOP , NOP , SADD]    \n",
      "[   0,    0,   -4,    9]    [NOP , NOP , SMUL, NOP ]    \n",
      "[   0,  123,   -1,    9]    [NOP , BZFA, LWI , SADD]    \n",
      "-------\n",
      "Instr =  20 ( 10 )\n",
      "[  -8,   43,    0,   36]    [NOP , NOP , NOP , SMUL]    \n",
      "[   8,    9,   -1, 37832]    [NOP , SADD, LWI , NOP ]    \n",
      "[   0,    0, 36460,   10]    [NOP , NOP , SADD, SADD]    \n",
      "[   0,  123, -113,    9]    [NOP , SADD, SSUB, BNE ]    \n",
      "-------\n",
      "Instr =  21 ( 9 )\n",
      "[  -9,   42,    0,   36]    [LXOR, SADD, NOP , NOP ]    \n",
      "[   9,    9,   -1, 37836]    [SADD, NOP , NOP , SADD]    \n",
      "[   0,    0,   -4,   10]    [NOP , NOP , SMUL, NOP ]    \n",
      "[   0,  123,   -1,   10]    [NOP , BZFA, LWI , SADD]    \n",
      "-------\n",
      "Instr =  22 ( 10 )\n",
      "[  -9,   42,    0,   40]    [NOP , NOP , NOP , SMUL]    \n",
      "[   9,   10,   -1, 37836]    [NOP , SADD, LWI , NOP ]    \n",
      "[   0,    0, 36460,   11]    [NOP , NOP , SADD, SADD]    \n",
      "[   0,  123, -113,    9]    [NOP , SADD, SSUB, BNE ]    \n",
      "-------\n",
      "Instr =  23 ( 9 )\n",
      "[ -10,   41,    0,   40]    [LXOR, SADD, NOP , NOP ]    \n",
      "[  10,   10,   -1, 37840]    [SADD, NOP , NOP , SADD]    \n",
      "[   0,    0,   -4,   11]    [NOP , NOP , SMUL, NOP ]    \n",
      "[   0,  123,   -1,   11]    [NOP , BZFA, LWI , SADD]    \n",
      "-------\n",
      "Instr =  24 ( 10 )\n",
      "[ -10,   41,    0,   44]    [NOP , NOP , NOP , SMUL]    \n",
      "[  10,   11,   -1, 37840]    [NOP , SADD, LWI , NOP ]    \n",
      "[   0,    0, 36460,   12]    [NOP , NOP , SADD, SADD]    \n",
      "[   0,  123, -113,    9]    [NOP , SADD, SSUB, BNE ]    \n",
      "-------\n",
      "Instr =  25 ( 9 )\n",
      "[ -11,   40,    0,   44]    [LXOR, SADD, NOP , NOP ]    \n",
      "[  11,   11,   -1, 37844]    [SADD, NOP , NOP , SADD]    \n",
      "[   0,    0,   -4,   12]    [NOP , NOP , SMUL, NOP ]    \n",
      "[   0,  123,   -1,   12]    [NOP , BZFA, LWI , SADD]    \n",
      "-------\n",
      "Instr =  26 ( 10 )\n",
      "[ -11,   40,    0,   48]    [NOP , NOP , NOP , SMUL]    \n",
      "[  11,   12,   -1, 37844]    [NOP , SADD, LWI , NOP ]    \n",
      "[   0,    0, 36460,   13]    [NOP , NOP , SADD, SADD]    \n",
      "[   0,  123, -113,    9]    [NOP , SADD, SSUB, BNE ]    \n",
      "-------\n",
      "Instr =  27 ( 9 )\n",
      "[ -12,   39,    0,   48]    [LXOR, SADD, NOP , NOP ]    \n",
      "[  12,   12,   -1, 37848]    [SADD, NOP , NOP , SADD]    \n",
      "[   0,    0,   -4,   13]    [NOP , NOP , SMUL, NOP ]    \n",
      "[   0,  123,   -1,   13]    [NOP , BZFA, LWI , SADD]    \n",
      "-------\n",
      "Instr =  28 ( 10 )\n",
      "[ -12,   39,    0,   52]    [NOP , NOP , NOP , SMUL]    \n",
      "[  12,   13,   -1, 37848]    [NOP , SADD, LWI , NOP ]    \n",
      "[   0,    0, 36460,   14]    [NOP , NOP , SADD, SADD]    \n",
      "[   0,  123, -113,    9]    [NOP , SADD, SSUB, BNE ]    \n",
      "-------\n",
      "Instr =  29 ( 9 )\n",
      "[ -13,   38,    0,   52]    [LXOR, SADD, NOP , NOP ]    \n",
      "[  13,   13,   -1, 37852]    [SADD, NOP , NOP , SADD]    \n",
      "[   0,    0,   -4,   14]    [NOP , NOP , SMUL, NOP ]    \n",
      "[   0,  123,   -1,   14]    [NOP , BZFA, LWI , SADD]    \n",
      "-------\n",
      "Instr =  30 ( 10 )\n",
      "[ -13,   38,    0,   56]    [NOP , NOP , NOP , SMUL]    \n",
      "[  13,   14,   -1, 37852]    [NOP , SADD, LWI , NOP ]    \n",
      "[   0,    0, 36460,   15]    [NOP , NOP , SADD, SADD]    \n",
      "[   0,  123, -113,    9]    [NOP , SADD, SSUB, BNE ]    \n",
      "-------\n",
      "Instr =  31 ( 9 )\n",
      "[ -14,   37,    0,   56]    [LXOR, SADD, NOP , NOP ]    \n",
      "[  14,   14,   -1, 37856]    [SADD, NOP , NOP , SADD]    \n",
      "[   0,    0,   -4,   15]    [NOP , NOP , SMUL, NOP ]    \n",
      "[   0,  123,   -1,   15]    [NOP , BZFA, LWI , SADD]    \n",
      "-------\n",
      "Instr =  32 ( 10 )\n",
      "[ -14,   37,    0,   60]    [NOP , NOP , NOP , SMUL]    \n",
      "[  14,   15,   -1, 37856]    [NOP , SADD, LWI , NOP ]    \n",
      "[   0,    0, 36460,   16]    [NOP , NOP , SADD, SADD]    \n",
      "[   0,  123, -113,    9]    [NOP , SADD, SSUB, BNE ]    \n",
      "-------\n",
      "Instr =  33 ( 9 )\n",
      "[ -15,   36,    0,   60]    [LXOR, SADD, NOP , NOP ]    \n",
      "[  15,   15,   -1, 37860]    [SADD, NOP , NOP , SADD]    \n",
      "[   0,    0,   -4,   16]    [NOP , NOP , SMUL, NOP ]    \n",
      "[   0,  123,   -1,   16]    [NOP , BZFA, LWI , SADD]    \n",
      "-------\n",
      "Instr =  34 ( 10 )\n",
      "[ -15,   36,    0,   64]    [NOP , NOP , NOP , SMUL]    \n",
      "[  15,   16,   -1, 37860]    [NOP , SADD, LWI , NOP ]    \n",
      "[   0,    0, 36460,   17]    [NOP , NOP , SADD, SADD]    \n",
      "[   0,  123, -113,    9]    [NOP , SADD, SSUB, BNE ]    \n",
      "-------\n",
      "Instr =  35 ( 9 )\n",
      "[ -16,   35,    0,   64]    [LXOR, SADD, NOP , NOP ]    \n",
      "[  16,   16,   -1, 37864]    [SADD, NOP , NOP , SADD]    \n",
      "[   0,    0,   -4,   17]    [NOP , NOP , SMUL, NOP ]    \n",
      "[   0,  123,   -1,   17]    [NOP , BZFA, LWI , SADD]    \n",
      "-------\n",
      "Instr =  36 ( 10 )\n",
      "[ -16,   35,    0,   68]    [NOP , NOP , NOP , SMUL]    \n",
      "[  16,   17,   -1, 37864]    [NOP , SADD, LWI , NOP ]    \n",
      "[   0,    0, 36460,   18]    [NOP , NOP , SADD, SADD]    \n",
      "[   0,  123, -113,    9]    [NOP , SADD, SSUB, BNE ]    \n",
      "-------\n",
      "Instr =  37 ( 9 )\n",
      "[ -17,   34,    0,   68]    [LXOR, SADD, NOP , NOP ]    \n",
      "[  17,   17,   -1, 37868]    [SADD, NOP , NOP , SADD]    \n",
      "[   0,    0,   -4,   18]    [NOP , NOP , SMUL, NOP ]    \n",
      "[   0,  123,   -1,   18]    [NOP , BZFA, LWI , SADD]    \n",
      "-------\n",
      "Instr =  38 ( 10 )\n",
      "[ -17,   34,    0,   72]    [NOP , NOP , NOP , SMUL]    \n",
      "[  17,   18,   -1, 37868]    [NOP , SADD, LWI , NOP ]    \n",
      "[   0,    0, 36460,   19]    [NOP , NOP , SADD, SADD]    \n",
      "[   0,  123, -113,    9]    [NOP , SADD, SSUB, BNE ]    \n",
      "-------\n",
      "Instr =  39 ( 9 )\n",
      "[ -18,   33,    0,   72]    [LXOR, SADD, NOP , NOP ]    \n",
      "[  18,   18,   -1, 37872]    [SADD, NOP , NOP , SADD]    \n",
      "[   0,    0,   -4,   19]    [NOP , NOP , SMUL, NOP ]    \n",
      "[   0,  123,   -1,   19]    [NOP , BZFA, LWI , SADD]    \n",
      "-------\n",
      "Instr =  40 ( 10 )\n",
      "[ -18,   33,    0,   76]    [NOP , NOP , NOP , SMUL]    \n",
      "[  18,   19,   -1, 37872]    [NOP , SADD, LWI , NOP ]    \n",
      "[   0,    0, 36460,   20]    [NOP , NOP , SADD, SADD]    \n",
      "[   0,  123, -113,    9]    [NOP , SADD, SSUB, BNE ]    \n",
      "-------\n",
      "Instr =  41 ( 9 )\n",
      "[ -19,   32,    0,   76]    [LXOR, SADD, NOP , NOP ]    \n",
      "[  19,   19,   -1, 37876]    [SADD, NOP , NOP , SADD]    \n",
      "[   0,    0,   -4,   20]    [NOP , NOP , SMUL, NOP ]    \n",
      "[   0,  123,   -1,   20]    [NOP , BZFA, LWI , SADD]    \n",
      "-------\n",
      "Instr =  42 ( 10 )\n",
      "[ -19,   32,    0,   80]    [NOP , NOP , NOP , SMUL]    \n",
      "[  19,   20,   -1, 37876]    [NOP , SADD, LWI , NOP ]    \n",
      "[   0,    0, 36460,   21]    [NOP , NOP , SADD, SADD]    \n",
      "[   0,  123, -113,    9]    [NOP , SADD, SSUB, BNE ]    \n",
      "-------\n",
      "Instr =  43 ( 9 )\n",
      "[ -20,   31,    0,   80]    [LXOR, SADD, NOP , NOP ]    \n",
      "[  20,   20,   -1, 37880]    [SADD, NOP , NOP , SADD]    \n",
      "[   0,    0,   -4,   21]    [NOP , NOP , SMUL, NOP ]    \n",
      "[   0,  123,   -1,   21]    [NOP , BZFA, LWI , SADD]    \n",
      "-------\n",
      "Instr =  44 ( 10 )\n",
      "[ -20,   31,    0,   84]    [NOP , NOP , NOP , SMUL]    \n",
      "[  20,   21,   -1, 37880]    [NOP , SADD, LWI , NOP ]    \n",
      "[   0,    0, 36460,   22]    [NOP , NOP , SADD, SADD]    \n",
      "[   0,  123, -113,    9]    [NOP , SADD, SSUB, BNE ]    \n",
      "-------\n",
      "Instr =  45 ( 9 )\n",
      "[ -21,   30,    0,   84]    [LXOR, SADD, NOP , NOP ]    \n",
      "[  21,   21,   -1, 37884]    [SADD, NOP , NOP , SADD]    \n",
      "[   0,    0,   -4,   22]    [NOP , NOP , SMUL, NOP ]    \n",
      "[   0,  123,   -1,   22]    [NOP , BZFA, LWI , SADD]    \n",
      "-------\n",
      "Instr =  46 ( 10 )\n",
      "[ -21,   30,    0,   88]    [NOP , NOP , NOP , SMUL]    \n",
      "[  21,   22,   -1, 37884]    [NOP , SADD, LWI , NOP ]    \n",
      "[   0,    0, 36460,   23]    [NOP , NOP , SADD, SADD]    \n",
      "[   0,  123, -113,    9]    [NOP , SADD, SSUB, BNE ]    \n",
      "-------\n",
      "Instr =  47 ( 9 )\n",
      "[ -22,   29,    0,   88]    [LXOR, SADD, NOP , NOP ]    \n",
      "[  22,   22,   -1, 37888]    [SADD, NOP , NOP , SADD]    \n",
      "[   0,    0,   -4,   23]    [NOP , NOP , SMUL, NOP ]    \n",
      "[   0,  123,   -1,   23]    [NOP , BZFA, LWI , SADD]    \n",
      "-------\n",
      "Instr =  48 ( 10 )\n",
      "[ -22,   29,    0,   92]    [NOP , NOP , NOP , SMUL]    \n",
      "[  22,   23,   -1, 37888]    [NOP , SADD, LWI , NOP ]    \n",
      "[   0,    0, 36460,   24]    [NOP , NOP , SADD, SADD]    \n",
      "[   0,  123, -113,    9]    [NOP , SADD, SSUB, BNE ]    \n",
      "-------\n",
      "Instr =  49 ( 9 )\n",
      "[ -23,   28,    0,   92]    [LXOR, SADD, NOP , NOP ]    \n",
      "[  23,   23,   -1, 37892]    [SADD, NOP , NOP , SADD]    \n",
      "[   0,    0,   -4,   24]    [NOP , NOP , SMUL, NOP ]    \n",
      "[   0,  123,   -1,   24]    [NOP , BZFA, LWI , SADD]    \n",
      "-------\n",
      "Instr =  50 ( 10 )\n",
      "[ -23,   28,    0,   96]    [NOP , NOP , NOP , SMUL]    \n",
      "[  23,   24,   -1, 37892]    [NOP , SADD, LWI , NOP ]    \n",
      "[   0,    0, 36460,   25]    [NOP , NOP , SADD, SADD]    \n",
      "[   0,  123, -113,    9]    [NOP , SADD, SSUB, BNE ]    \n",
      "-------\n",
      "Instr =  51 ( 9 )\n",
      "[ -24,   27,    0,   96]    [LXOR, SADD, NOP , NOP ]    \n",
      "[  24,   24,   -1, 37896]    [SADD, NOP , NOP , SADD]    \n",
      "[   0,    0,   -4,   25]    [NOP , NOP , SMUL, NOP ]    \n",
      "[   0,  123,   -1,   25]    [NOP , BZFA, LWI , SADD]    \n",
      "-------\n",
      "Instr =  52 ( 10 )\n",
      "[ -24,   27,    0,  100]    [NOP , NOP , NOP , SMUL]    \n",
      "[  24,   25,   -1, 37896]    [NOP , SADD, LWI , NOP ]    \n",
      "[   0,    0, 36460,   26]    [NOP , NOP , SADD, SADD]    \n",
      "[   0,  123, -113,    9]    [NOP , SADD, SSUB, BNE ]    \n",
      "-------\n",
      "Instr =  53 ( 9 )\n",
      "[ -25,   26,    0,  100]    [LXOR, SADD, NOP , NOP ]    \n",
      "[  25,   25,   -1, 37900]    [SADD, NOP , NOP , SADD]    \n",
      "[   0,    0,   -4,   26]    [NOP , NOP , SMUL, NOP ]    \n",
      "[   0,  123,   -1,   26]    [NOP , BZFA, LWI , SADD]    \n",
      "-------\n",
      "Instr =  54 ( 10 )\n",
      "[ -25,   26,    0,  104]    [NOP , NOP , NOP , SMUL]    \n",
      "[  25,   26,   -1, 37900]    [NOP , SADD, LWI , NOP ]    \n",
      "[   0,    0, 36460,   27]    [NOP , NOP , SADD, SADD]    \n",
      "[   0,  123, -113,    9]    [NOP , SADD, SSUB, BNE ]    \n",
      "-------\n",
      "Instr =  55 ( 9 )\n",
      "[ -26,   25,    0,  104]    [LXOR, SADD, NOP , NOP ]    \n",
      "[  26,   26,   -1, 37904]    [SADD, NOP , NOP , SADD]    \n",
      "[   0,    0,   -4,   27]    [NOP , NOP , SMUL, NOP ]    \n",
      "[   0,  123,   -1,   27]    [NOP , BZFA, LWI , SADD]    \n",
      "-------\n",
      "Instr =  56 ( 10 )\n",
      "[ -26,   25,    0,  108]    [NOP , NOP , NOP , SMUL]    \n",
      "[  26,   27,   -1, 37904]    [NOP , SADD, LWI , NOP ]    \n",
      "[   0,    0, 36460,   28]    [NOP , NOP , SADD, SADD]    \n",
      "[   0,  123, -113,    9]    [NOP , SADD, SSUB, BNE ]    \n",
      "-------\n",
      "Instr =  57 ( 9 )\n",
      "[ -27,   24,    0,  108]    [LXOR, SADD, NOP , NOP ]    \n",
      "[  27,   27,   -1, 37908]    [SADD, NOP , NOP , SADD]    \n",
      "[   0,    0,   -4,   28]    [NOP , NOP , SMUL, NOP ]    \n",
      "[   0,  123,   -1,   28]    [NOP , BZFA, LWI , SADD]    \n",
      "-------\n",
      "Instr =  58 ( 10 )\n",
      "[ -27,   24,    0,  112]    [NOP , NOP , NOP , SMUL]    \n",
      "[  27,   28,   -1, 37908]    [NOP , SADD, LWI , NOP ]    \n",
      "[   0,    0, 36460,   29]    [NOP , NOP , SADD, SADD]    \n",
      "[   0,  123, -113,    9]    [NOP , SADD, SSUB, BNE ]    \n",
      "-------\n",
      "Instr =  59 ( 9 )\n",
      "[ -28,   23,    0,  112]    [LXOR, SADD, NOP , NOP ]    \n",
      "[  28,   28,   -1, 37912]    [SADD, NOP , NOP , SADD]    \n",
      "[   0,    0,   -4,   29]    [NOP , NOP , SMUL, NOP ]    \n",
      "[   0,  123,   -1,   29]    [NOP , BZFA, LWI , SADD]    \n",
      "-------\n",
      "Instr =  60 ( 10 )\n",
      "[ -28,   23,    0,  116]    [NOP , NOP , NOP , SMUL]    \n",
      "[  28,   29,   -1, 37912]    [NOP , SADD, LWI , NOP ]    \n",
      "[   0,    0, 36460,   30]    [NOP , NOP , SADD, SADD]    \n",
      "[   0,  123, -113,    9]    [NOP , SADD, SSUB, BNE ]    \n",
      "-------\n",
      "Instr =  61 ( 9 )\n",
      "[ -29,   22,    0,  116]    [LXOR, SADD, NOP , NOP ]    \n",
      "[  29,   29,   -1, 37916]    [SADD, NOP , NOP , SADD]    \n",
      "[   0,    0,   -4,   30]    [NOP , NOP , SMUL, NOP ]    \n",
      "[   0,  123,   -1,   30]    [NOP , BZFA, LWI , SADD]    \n",
      "-------\n",
      "Instr =  62 ( 10 )\n",
      "[ -29,   22,    0,  120]    [NOP , NOP , NOP , SMUL]    \n",
      "[  29,   30,   -1, 37916]    [NOP , SADD, LWI , NOP ]    \n",
      "[   0,    0, 36460,   31]    [NOP , NOP , SADD, SADD]    \n",
      "[   0,  123, -113,    9]    [NOP , SADD, SSUB, BNE ]    \n",
      "-------\n",
      "Instr =  63 ( 9 )\n",
      "[ -30,   21,    0,  120]    [LXOR, SADD, NOP , NOP ]    \n",
      "[  30,   30,   -1, 37920]    [SADD, NOP , NOP , SADD]    \n",
      "[   0,    0,   -4,   31]    [NOP , NOP , SMUL, NOP ]    \n",
      "[   0,  123,   -1,   31]    [NOP , BZFA, LWI , SADD]    \n",
      "-------\n",
      "Instr =  64 ( 10 )\n",
      "[ -30,   21,    0,  124]    [NOP , NOP , NOP , SMUL]    \n",
      "[  30,   31,   -1, 37920]    [NOP , SADD, LWI , NOP ]    \n",
      "[   0,    0, 36460,   32]    [NOP , NOP , SADD, SADD]    \n",
      "[   0,  123, -113,    9]    [NOP , SADD, SSUB, BNE ]    \n",
      "-------\n",
      "Instr =  65 ( 9 )\n",
      "[ -31,   20,    0,  124]    [LXOR, SADD, NOP , NOP ]    \n",
      "[  31,   31,   -1, 37924]    [SADD, NOP , NOP , SADD]    \n",
      "[   0,    0,   -4,   32]    [NOP , NOP , SMUL, NOP ]    \n",
      "[   0,  123,   -1,   32]    [NOP , BZFA, LWI , SADD]    \n",
      "-------\n",
      "Instr =  66 ( 10 )\n",
      "[ -31,   20,    0,  128]    [NOP , NOP , NOP , SMUL]    \n",
      "[  31,   32,   -1, 37924]    [NOP , SADD, LWI , NOP ]    \n",
      "[   0,    0, 36460,   33]    [NOP , NOP , SADD, SADD]    \n",
      "[   0,  123, -113,    9]    [NOP , SADD, SSUB, BNE ]    \n",
      "-------\n",
      "Instr =  67 ( 9 )\n",
      "[ -32,   19,    0,  128]    [LXOR, SADD, NOP , NOP ]    \n",
      "[  32,   32,   -1, 37928]    [SADD, NOP , NOP , SADD]    \n",
      "[   0,    0,   -4,   33]    [NOP , NOP , SMUL, NOP ]    \n",
      "[   0,  123,   -1,   33]    [NOP , BZFA, LWI , SADD]    \n",
      "-------\n",
      "Instr =  68 ( 10 )\n",
      "[ -32,   19,    0,  132]    [NOP , NOP , NOP , SMUL]    \n",
      "[  32,   33,   -1, 37928]    [NOP , SADD, LWI , NOP ]    \n",
      "[   0,    0, 36460,   34]    [NOP , NOP , SADD, SADD]    \n",
      "[   0,  123, -113,    9]    [NOP , SADD, SSUB, BNE ]    \n",
      "-------\n",
      "Instr =  69 ( 9 )\n",
      "[ -33,   18,    0,  132]    [LXOR, SADD, NOP , NOP ]    \n",
      "[  33,   33,   -1, 37932]    [SADD, NOP , NOP , SADD]    \n",
      "[   0,    0,   -4,   34]    [NOP , NOP , SMUL, NOP ]    \n",
      "[   0,  123,   -1,   34]    [NOP , BZFA, LWI , SADD]    \n",
      "-------\n",
      "Instr =  70 ( 10 )\n",
      "[ -33,   18,    0,  136]    [NOP , NOP , NOP , SMUL]    \n",
      "[  33,   34,   -1, 37932]    [NOP , SADD, LWI , NOP ]    \n",
      "[   0,    0, 36460,   35]    [NOP , NOP , SADD, SADD]    \n",
      "[   0,  123, -113,    9]    [NOP , SADD, SSUB, BNE ]    \n",
      "-------\n",
      "Instr =  71 ( 9 )\n",
      "[ -34,   17,    0,  136]    [LXOR, SADD, NOP , NOP ]    \n",
      "[  34,   34,   -1, 37936]    [SADD, NOP , NOP , SADD]    \n",
      "[   0,    0,   -4,   35]    [NOP , NOP , SMUL, NOP ]    \n",
      "[   0,  123,   -1,   35]    [NOP , BZFA, LWI , SADD]    \n",
      "-------\n",
      "Instr =  72 ( 10 )\n",
      "[ -34,   17,    0,  140]    [NOP , NOP , NOP , SMUL]    \n",
      "[  34,   35,   -1, 37936]    [NOP , SADD, LWI , NOP ]    \n",
      "[   0,    0, 36460,   36]    [NOP , NOP , SADD, SADD]    \n",
      "[   0,  123, -113,    9]    [NOP , SADD, SSUB, BNE ]    \n",
      "-------\n",
      "Instr =  73 ( 9 )\n",
      "[ -35,   16,    0,  140]    [LXOR, SADD, NOP , NOP ]    \n",
      "[  35,   35,   -1, 37940]    [SADD, NOP , NOP , SADD]    \n",
      "[   0,    0,   -4,   36]    [NOP , NOP , SMUL, NOP ]    \n",
      "[   0,  123,   -1,   36]    [NOP , BZFA, LWI , SADD]    \n",
      "-------\n",
      "Instr =  74 ( 10 )\n",
      "[ -35,   16,    0,  144]    [NOP , NOP , NOP , SMUL]    \n",
      "[  35,   36,   -1, 37940]    [NOP , SADD, LWI , NOP ]    \n",
      "[   0,    0, 36460,   37]    [NOP , NOP , SADD, SADD]    \n",
      "[   0,  123, -113,    9]    [NOP , SADD, SSUB, BNE ]    \n",
      "-------\n",
      "Instr =  75 ( 9 )\n",
      "[ -36,   15,    0,  144]    [LXOR, SADD, NOP , NOP ]    \n",
      "[  36,   36,   -1, 37944]    [SADD, NOP , NOP , SADD]    \n",
      "[   0,    0,   -4,   37]    [NOP , NOP , SMUL, NOP ]    \n",
      "[   0,  123,   -1,   37]    [NOP , BZFA, LWI , SADD]    \n",
      "-------\n",
      "Instr =  76 ( 10 )\n",
      "[ -36,   15,    0,  148]    [NOP , NOP , NOP , SMUL]    \n",
      "[  36,   37,   -1, 37944]    [NOP , SADD, LWI , NOP ]    \n",
      "[   0,    0, 36460,   38]    [NOP , NOP , SADD, SADD]    \n",
      "[   0,  123, -113,    9]    [NOP , SADD, SSUB, BNE ]    \n",
      "-------\n",
      "Instr =  77 ( 9 )\n",
      "[ -37,   14,    0,  148]    [LXOR, SADD, NOP , NOP ]    \n",
      "[  37,   37,   -1, 37948]    [SADD, NOP , NOP , SADD]    \n",
      "[   0,    0,   -4,   38]    [NOP , NOP , SMUL, NOP ]    \n",
      "[   0,  123,   -1,   38]    [NOP , BZFA, LWI , SADD]    \n",
      "-------\n",
      "Instr =  78 ( 10 )\n",
      "[ -37,   14,    0,  152]    [NOP , NOP , NOP , SMUL]    \n",
      "[  37,   38,   -1, 37948]    [NOP , SADD, LWI , NOP ]    \n",
      "[   0,    0, 36460,   39]    [NOP , NOP , SADD, SADD]    \n",
      "[   0,  123, -113,    9]    [NOP , SADD, SSUB, BNE ]    \n",
      "-------\n",
      "Instr =  79 ( 9 )\n",
      "[ -38,   13,    0,  152]    [LXOR, SADD, NOP , NOP ]    \n",
      "[  38,   38,   -1, 37952]    [SADD, NOP , NOP , SADD]    \n",
      "[   0,    0,   -4,   39]    [NOP , NOP , SMUL, NOP ]    \n",
      "[   0,  123,   -1,   39]    [NOP , BZFA, LWI , SADD]    \n",
      "-------\n",
      "Instr =  80 ( 10 )\n",
      "[ -38,   13,    0,  156]    [NOP , NOP , NOP , SMUL]    \n",
      "[  38,   39,   -1, 37952]    [NOP , SADD, LWI , NOP ]    \n",
      "[   0,    0, 36460,   40]    [NOP , NOP , SADD, SADD]    \n",
      "[   0,  123, -113,    9]    [NOP , SADD, SSUB, BNE ]    \n",
      "-------\n",
      "Instr =  81 ( 9 )\n",
      "[ -39,   12,    0,  156]    [LXOR, SADD, NOP , NOP ]    \n",
      "[  39,   39,   -1, 37956]    [SADD, NOP , NOP , SADD]    \n",
      "[   0,    0,   -4,   40]    [NOP , NOP , SMUL, NOP ]    \n",
      "[   0,  123,   -1,   40]    [NOP , BZFA, LWI , SADD]    \n",
      "-------\n",
      "Instr =  82 ( 10 )\n",
      "[ -39,   12,    0,  160]    [NOP , NOP , NOP , SMUL]    \n",
      "[  39,   40,   -1, 37956]    [NOP , SADD, LWI , NOP ]    \n",
      "[   0,    0, 36460,   41]    [NOP , NOP , SADD, SADD]    \n",
      "[   0,  123, -113,    9]    [NOP , SADD, SSUB, BNE ]    \n",
      "-------\n",
      "Instr =  83 ( 9 )\n",
      "[ -40,   11,    0,  160]    [LXOR, SADD, NOP , NOP ]    \n",
      "[  40,   40,   -1, 37960]    [SADD, NOP , NOP , SADD]    \n",
      "[   0,    0,   -4,   41]    [NOP , NOP , SMUL, NOP ]    \n",
      "[   0,  123,   -1,   41]    [NOP , BZFA, LWI , SADD]    \n",
      "-------\n",
      "Instr =  84 ( 10 )\n",
      "[ -40,   11,    0,  164]    [NOP , NOP , NOP , SMUL]    \n",
      "[  40,   41,   -1, 37960]    [NOP , SADD, LWI , NOP ]    \n",
      "[   0,    0, 36460,   42]    [NOP , NOP , SADD, SADD]    \n",
      "[   0,  123, -113,    9]    [NOP , SADD, SSUB, BNE ]    \n",
      "-------\n",
      "Instr =  85 ( 9 )\n",
      "[ -41,   10,    0,  164]    [LXOR, SADD, NOP , NOP ]    \n",
      "[  41,   41,   -1, 37964]    [SADD, NOP , NOP , SADD]    \n",
      "[   0,    0,   -4,   42]    [NOP , NOP , SMUL, NOP ]    \n",
      "[   0,  123,   -1,   42]    [NOP , BZFA, LWI , SADD]    \n",
      "-------\n",
      "Instr =  86 ( 10 )\n",
      "[ -41,   10,    0,  168]    [NOP , NOP , NOP , SMUL]    \n",
      "[  41,   42,   -1, 37964]    [NOP , SADD, LWI , NOP ]    \n",
      "[   0,    0, 36460,   43]    [NOP , NOP , SADD, SADD]    \n",
      "[   0,  123, -113,    9]    [NOP , SADD, SSUB, BNE ]    \n",
      "-------\n",
      "Instr =  87 ( 9 )\n",
      "[ -42,    9,    0,  168]    [LXOR, SADD, NOP , NOP ]    \n",
      "[  42,   42,   -1, 37968]    [SADD, NOP , NOP , SADD]    \n",
      "[   0,    0,   -4,   43]    [NOP , NOP , SMUL, NOP ]    \n",
      "[   0,  123,   -1,   43]    [NOP , BZFA, LWI , SADD]    \n",
      "-------\n",
      "Instr =  88 ( 10 )\n",
      "[ -42,    9,    0,  172]    [NOP , NOP , NOP , SMUL]    \n",
      "[  42,   43,   -1, 37968]    [NOP , SADD, LWI , NOP ]    \n",
      "[   0,    0, 36460,   44]    [NOP , NOP , SADD, SADD]    \n",
      "[   0,  123, -113,    9]    [NOP , SADD, SSUB, BNE ]    \n",
      "-------\n",
      "Instr =  89 ( 9 )\n",
      "[ -43,    8,    0,  172]    [LXOR, SADD, NOP , NOP ]    \n",
      "[  43,   43,   -1, 37972]    [SADD, NOP , NOP , SADD]    \n",
      "[   0,    0,   -4,   44]    [NOP , NOP , SMUL, NOP ]    \n",
      "[   0,  123,   -1,   44]    [NOP , BZFA, LWI , SADD]    \n",
      "-------\n",
      "Instr =  90 ( 10 )\n",
      "[ -43,    8,    0,  176]    [NOP , NOP , NOP , SMUL]    \n",
      "[  43,   44,   -1, 37972]    [NOP , SADD, LWI , NOP ]    \n",
      "[   0,    0, 36460,   45]    [NOP , NOP , SADD, SADD]    \n",
      "[   0,  123, -113,    9]    [NOP , SADD, SSUB, BNE ]    \n",
      "-------\n",
      "Instr =  91 ( 9 )\n",
      "[ -44,    7,    0,  176]    [LXOR, SADD, NOP , NOP ]    \n",
      "[  44,   44,   -1, 37976]    [SADD, NOP , NOP , SADD]    \n",
      "[   0,    0,   -4,   45]    [NOP , NOP , SMUL, NOP ]    \n",
      "[   0,  123,   -1,   45]    [NOP , BZFA, LWI , SADD]    \n",
      "-------\n",
      "Instr =  92 ( 10 )\n",
      "[ -44,    7,    0,  180]    [NOP , NOP , NOP , SMUL]    \n",
      "[  44,   45,   -1, 37976]    [NOP , SADD, LWI , NOP ]    \n",
      "[   0,    0, 36460,   46]    [NOP , NOP , SADD, SADD]    \n",
      "[   0,  123, -113,    9]    [NOP , SADD, SSUB, BNE ]    \n",
      "-------\n",
      "Instr =  93 ( 11 )\n",
      "[ -45,    6,    0,  180]    [LXOR, SADD, NOP , NOP ]    \n",
      "[  45,   45,   -1, 37980]    [SADD, NOP , NOP , SADD]    \n",
      "[   0,    0,   -4,   46]    [NOP , NOP , SMUL, NOP ]    \n",
      "[   0,  123,   -1,    9]    [NOP , BZFA, LWI , NOP ]    \n",
      "-------\n",
      "Instr =  94 ( 12 )\n",
      "[ -45,    6,    0,  180]    [NOP , NOP , NOP , NOP ]    \n",
      "[  45,   46,   -1, 37980]    [NOP , SADD, LWI , NOP ]    \n",
      "[   0,    0, 36460,   46]    [NOP , NOP , SADD, NOP ]    \n",
      "[   0,  123, -113,   13]    [NOP , SADD, SSUB, BEQ ]    \n",
      "-------\n",
      "Instr =  95 ( 13 )\n",
      "[ -46,    5,    0,  180]    [LXOR, SADD, NOP , NOP ]    \n",
      "[  45,   46,   -1, 37980]    [NOP , NOP , NOP , NOP ]    \n",
      "[   0,    0,   -4,   46]    [NOP , NOP , SMUL, NOP ]    \n",
      "[   0,  123,   -1,   13]    [NOP , BZFA, LWI , NOP ]    \n",
      "-------\n",
      "Instr =  96 ( 14 )\n",
      "[ -46,    5,    0,  180]    [NOP , NOP , NOP , NOP ]    \n",
      "[  45,   46,   -1, 37980]    [NOP , NOP , NOP , NOP ]    \n",
      "[   0,    0, 36460,   46]    [NOP , NOP , SADD, NOP ]    \n",
      "[   0,  123, -113,   13]    [NOP , SADD, SSUB, NOP ]    \n",
      "-------\n",
      "Instr =  97 ( 15 )\n",
      "[ -46,    4,    0,  180]    [NOP , SADD, NOP , NOP ]    \n",
      "[  45,   46,   -1, 37980]    [NOP , NOP , NOP , NOP ]    \n",
      "[   0,    0, 36460,   46]    [NOP , NOP , NOP , NOP ]    \n",
      "[   0,  123,   -1,   13]    [NOP , BZFA, LWI , NOP ]    \n",
      "-------\n",
      "Instr =  98 ( 16 )\n",
      "[ -46,    4,    0,  180]    [NOP , NOP , NOP , NOP ]    \n",
      "[  45,   46,   -1, 37980]    [NOP , NOP , NOP , NOP ]    \n",
      "[   0,    0, 36460,   46]    [NOP , NOP , NOP , NOP ]    \n",
      "[   0,  123, -113,   13]    [NOP , SADD, SSUB, NOP ]    \n",
      "-------\n",
      "Instr =  99 ( 17 )\n",
      "[ -46,    4,    0,  180]    [NOP , NOP , NOP , NOP ]    \n",
      "[  45,   46,   -1, 37980]    [NOP , NOP , NOP , NOP ]    \n",
      "[   0,    0, 36460,   46]    [NOP , NOP , NOP , NOP ]    \n",
      "[   0,  123, -113,   13]    [NOP , BZFA, NOP , NOP ]    \n",
      "-------\n",
      "Instr =  100 ( 18 )\n",
      "[ -46,    4,    0,  180]    [NOP , NOP , NOP , NOP ]    \n",
      "[  45,   46,   -1, 37980]    [NOP , NOP , NOP , NOP ]    \n",
      "[   0,    0, 36460,   46]    [NOP , NOP , NOP , NOP ]    \n",
      "[   0,  123, -113,   13]    [NOP , SWD , NOP , EXIT]    \n",
      "\n",
      "\n",
      "END\n"
     ]
    }
   ],
   "source": [
    "import sys\n",
    "sys.path.append(\"../src/\")\n",
    "from cgra import *\n",
    "\n",
    "kernel_name = \"strsearch\"\n",
    "# Input data\n",
    "clear_memory(kernel_name)\n",
    "add_memory_region(kernel_name, 1000, [50, 123, 36464, 112, 37800, 45])\n",
    "# Set load and write addrs\n",
    "load_addrs = [0, 1000, 1008, 1016]\n",
    "store_addrs = [0, 4, 0, 0]\n",
    "run(kernel_name, pr=[\"ROUT\",\"OPS\"],  load_addrs=load_addrs, store_addrs=store_addrs)"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.10.12"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
